<!DOCTYPE html>
<html>
<head>
  <title>预防针后台管理</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
  <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
  <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
  <style>
    
  </style>
</head>

<!-- 导航栏 -->
<nav class="navbar navbar-expand-md bg-dark navbar-dark fixed-top">
  <a class="navbar-brand" href="#">儿童预防针预约系统管理平台</a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
    <span class="navbar-toggler-icon"></span>
  </button>
  <div class="collapse navbar-collapse" id="collapsibleNavbar">
    <ul class="navbar-nav">
      <!-- <li class="nav-item">
        <a class="nav-link" href="#">Link</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Link</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Link</a>
      </li>     -->
    </ul>
  </div>  
</nav>
<br>
<!-- 导航栏end -->
<!-- 内容 -->
<div class="container-fluid" style="height: 80vh;margin-top: 60px;">
    <div class="row">
        <div class="col-md-2" >
            <div class="list-group aa " style="overflow:auto;">
              <a href="{:url('home/index')}" class="list-group-item list-group-item-action">疫苗管理</a>
              <a href="{:url('hos/index')}" class="list-group-item list-group-item-action">卫生院管理</a>
              <a href="{:url('appointment/index')}" class="list-group-item list-group-item-action">预约单管理</a>
              <a href="{:url('user/index')}" class="list-group-item list-group-item-action">用户管理</a>
            </div>
            <a href="{:url('index/logout')}" class="btn btn-danger" style="width: 100%;margin-top: 20px;" role="button">注销</a>
        </div>
        <div class="col-md-10">
          <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="index.html">首页</a></li>
            <li class="breadcrumb-item active">疫苗列表</li>
          </ol>
            <div class="card">
                <div class="card-body">
                  <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">添加疫苗</button>
                </div>
                <div class="row" style="height: 600px;overflow:auto; margin: 0px 10px;">
                  <table class="table table-bordered" style="table-layout:fixed;
                  word-break:break-all;
                  word-wrap:break-word;
                  border-collapse:collapse;
                  margin:0;
                  padding:0;">
                    <thead>
                      <tr>
                        <th>名称</th>
                        <th>打针年龄</th>
                        <th>作用</th>
                        <th>操作</th>
                      </tr>
                    </thead>
                    <tbody >
                        {volist name="res" id="vo"}
                      <tr>
                        <td>{$vo.vaccine_name}</td>
                        <td>{$vo.vaccine_age}个月</td>
                        <td>{$vo.vaccine_effect}</td>
                        <td>
                          <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
                            操作
                            </button>
                            <div class="dropdown-menu">
                              <!-- <a class="dropdown-item" href="#">修改</a> -->
                              <a class="dropdown-item" href="{:url('home/del',['vaccine_id'=>$vo.vaccine_id])}">删除</a>
                            </div>
                        </td>
                      </tr>
                      {/volist}
                    </tbody>
                  </table>
                </div>
                
            </div>
        </div>
        </div>
</div>

<!-- 内容end -->

<!-- 模态框 -->
<div class="modal fade" id="myModal">
  <div class="modal-dialog">
    <div class="modal-content">
 
      <!-- 模态框头部 -->
      <div class="modal-header">
        <h4 class="modal-title">填写疫苗信息</h4>
        <button type="button" class="close" data-dismiss="modal">&times;</button>
      </div>
 
      <!-- 模态框主体 -->
      <div class="modal-body">
        <form action="{:url('home/addvaccine')}" method="POST">
          <div class="form-group">
            <label for="usr">疫苗名称:</label>
            <input type="text" class="form-control" name="vaccine_name" id="usr">
          </div>
          <div class="form-group">
            <label for="usr">打针年龄:</label>
            <input type="number" class="form-control" name="vaccine_age" id="age">
          </div>
          <div class="form-group">
            <label for="comment">作用:</label>
            <textarea class="form-control" rows="5" name="vaccine_effect" id="comment"></textarea>
          </div>
          <button type="submit" class="btn btn-primary">添加</button>
        </form>
      </div>
 
      <!-- 模态框底部 -->
      <!-- <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
      </div> -->
 
    </div>
  </div>
</div>
<!-- 底部  -->
<div class="jumbotron text-center" style="margin-bottom:0">
    <p>@2020-tch</p>
</div>

<!-- 底部end  -->
</body>
</html>